<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  <link rel="stylesheet" href="reset.css">
  <link rel="stylesheet" href="font.css">
  <link rel="stylesheet" href="main.css">
  <link rel="stylesheet" href="fenle.css">
  <link rel="stylesheet" href="my.css">
  <link rel="stylesheet" href="swiper.css">
  <link rel="stylesheet" href="details.css">


  <div id="app" class="app">
    
    <router-view id="content"></router-view>
  </div>
  <script src="js/vue.js"></script>
  <script src="js/vue-router.js"></script>
  <script src="view/xui.js"></script>
  <script src="js/swiper.js"></script>
  <script src="view/swiper.js"></script>
  <script src="view/Home.js"></script>
  <script src="view/Classify.js"></script>
  <script src="view/Details.js"></script>
  <script src="view/My.js"></script>
  
  <script src="view/router.js"></script>
  <script src="view/app.js"></script>

  <!-- <script>
    var time1 = null;
    //地址栏锚点改变后触发
    window.onhashchange = function () {
      var url = 'view' + (location.hash.slice(1) || '/shouye') + '.html';
      loadPage(url);
    }
    //页面载入完毕后触发，也就是一刷新就触发
    window.onload = function () {
      var url = 'view' + (location.hash.slice(1) || '/shouye') + '.html';
      loadPage(url);
      document.querySelector(`[href="${location.hash}"]`).classList.add('active');
    }
    //ajax异步载入指定的页面模板内容
    function loadPage(url) {
      var xhr = new XMLHttpRequest();
      xhr.onreadystatechange = function () {
        if (xhr.readyState === 4 && xhr.status === 200) {
          var res = xhr.responseText;
          var arr = res.split('<script>');
          var Scripts = document.querySelectorAll('script');
          document.getElementById('content').innerHTML = arr[0];
          for (var i = 0; i < Scripts.length; i++) {
            if (Scripts[i].id) document.getElementById(Scripts[i].id).remove();
          }
          var script = document.createElement('script');
          script.id = url;
          script.textContent = arr[1].replace(/<\/script>/g, '');
          document.body.append(script);
        }
      }
      xhr.open('GET', url);
      xhr.send();
    }
  </script> -->
</body>
</html>